<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8" />
    <title>意见箱</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <!-- END Icons -->
    <link rel="stylesheet" href="/static/amis-sdk/sdk.css">
    <link rel="stylesheet" href="/static/amis-sdk/helper.css">
    <link rel="stylesheet" href="/static/amis-static/iconfont.css">
    <style>
        .grid_nav_className {
            border-style: none;
        }

        .grid_nav_itemClassName {
            border-style: none;
        }

        .grid_nav_contentClassName {
            border-style: none;
        }
    </style>
</head>

<body style="background-color: #0098a5;">
    <div id="root" class="app-wrapper"></div>
    <script rel="stylesheet" src="/static/amis-sdk/sdk.js"></script>
    <script>
        window.parent.postMessage(
            {
                type: 'amis:resize',
                data: {
                    height: document.body.scrollHeight

                }
            },
            '*'
        );
        (function () {
            let amis = amisRequire('amis/embed');
            // 通过替换下面这个配置来生成不同页面

            const app = {
                "type": "page",
                'style': {
                    'background-color': '#0098a5',

                },
                "body": {
                    "type": "form",
                    'title': '<h1>校长信箱</h1>',
                    "wrapWithPanel": true,

                    'className': 'page-form',
                    // "actions": [],
                    'redirect':'/',
                    "api": {
                        "method": "post",
                        "url": "/yperp/index/add",
                    },
                    "body": [
                        
                        {
                            "type": "input-file",
                            "name": "file",
                            "label": "附件上传",
                            "accept": "*",
                            "multiple":"true",
                            "receiver": "https://erp.lhp/index.php/yperp/attachment/upload/dir/files/module/yperp"
                        }
                    ],
                    'messages': {
                        // 'saveSuccess': '提交成功',
                        'fetchSuccess': '意见已收到，感谢您的反馈，我们将持续改进教学和管理！',
                        'fetchFailed': '系统开小差了o(╥﹏╥)o，赶快联系管理员。。。',
                    }
                }
            };
            let amisScoped = amis.embed('#root', app);
        })();
        // 刷新验证码
        function refresh_code() {
            document.querySelector('.code_img').src = '/index.php/captcha.html?' + Math.random();///index.php/captcha.html  '{:captcha_src()}?'
        }
    </script>
</body>

</html>